import * as THREE from 'three';
export interface Device {
  deviceId: string,
  label: string
}
export interface Devices {
  // 麦克风
  audioinput: Device[]
  // 扬声器
  audiooutput: Device[]
  // 视频
  videoinput: Device[]
  screen: Device[]
}

export interface StreamConfig { audio: boolean | MediaTrackConstraints, video: boolean | MediaTrackConstraints }


export type configTypes = Array<CameraFace | screenFace>
export type configType = CameraFace | screenFace

export interface CameraFace {
  video: boolean | MediaTrackConstraints
  audio: boolean | MediaTrackConstraints
  isVideo: boolean
  isAudio: boolean
  isStop: boolean
  type: 'Camera'
  stream: MediaStream | null
  id: string
  videoTexture:THREE.VideoTexture | null
  x: number,
  y: number,
  scale:number,
}

export interface screenFace {
  video: boolean | MediaTrackConstraints
  audio: boolean | MediaTrackConstraints
  isVideo: boolean
  isAudio: boolean
  isStop: boolean
  type: 'Screen'
  stream: MediaStream | null
  id: string
  videoTexture:THREE.VideoTexture | null
  x: number,
  y: number,
  scale:number,
}

